package com.aiyige.page.selectinterest.model;

/**
 * Created by zhuyakun on 2017/10/25.
 */

public class InterestItem {
    String id;
    String title;
    boolean selected;
    boolean allSelected;

    public InterestItem() {
    }

    public InterestItem(String id, String title, boolean selected, boolean allSelected) {
        this.id = id;
        this.title = title;
        this.selected = selected;
        this.allSelected = allSelected;
    }

    private InterestItem(Builder builder) {
        setId(builder.id);
        setTitle(builder.title);
        setSelected(builder.selected);
        setAllSelected(builder.allSelected);
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public boolean isSelected() {
        return selected;
    }

    public void setSelected(boolean selected) {
        this.selected = selected;
    }

    public boolean isAllSelected() {
        return allSelected;
    }

    public void setAllSelected(boolean allSelected) {
        this.allSelected = allSelected;
    }


    public static final class Builder {
        private String id;
        private String title;
        private boolean selected;
        private boolean allSelected;

        private Builder() {
            selected = false;
            allSelected = false;
            id = "";
            title = "";
        }

        public Builder id(String id) {
            this.id = id;
            return this;
        }

        public Builder title(String title) {
            this.title = title;
            return this;
        }

        public Builder selected(boolean selected) {
            this.selected = selected;
            return this;
        }

        public Builder allSelected(boolean allSelected) {
            this.allSelected = allSelected;
            return this;
        }

        public InterestItem build() {
            return new InterestItem(this);
        }
    }
}
